﻿using ShanNiang.Hosting.Common;
using ShanNiang.Hosting.Enumerate;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShanNiang.Service.LoginModels.Requests
{
    public class AddProviderRequest : RequestBase
    {

        /// <summary>
        /// 用户名
        /// </summary>
        [Required]
        public string? UserName { get; set; }

        /// <summary>
        /// 第三方名称
        /// </summary>
        [Required]
        public string? ProviderName { get; set; }

        /// <summary>
        /// 第三方Key
        /// </summary>
        [Required]
        public string? ProviderKey { get; set; }

        /// <summary>
        /// 短信验证码
        /// </summary>
        [Required]
        public string? SmsCode { get; set; }

        /// <summary>
        /// 是否自动注册
        /// </summary>
        [Required]
        public bool AutoRegister { get; set; } = false;
        /// <summary>
        /// 登陆过程缓存key
        /// </summary>
        public string? LoginKey { get; set; }



        public override ApiServer ApiServer => ApiServer.IdsServer;

        public override HttpMethod Method => HttpMethod.Post;

        public override bool NeedToken => false;

        protected override string RequestPath => "/api/AppGrant/AddProvider";
    }
}
